package org.myproject.persistence.event;

import java.io.Serializable;

import org.hibernate.persister.entity.EntityPersister;

public class PreUpdateEvent extends PersistenceEvent
{
    private static final long serialVersionUID = 1L;

    private final Object[] oldState;
    private final Object[] newState;

    public PreUpdateEvent(Object source, Object entity, Serializable id, EntityPersister persister,
            Object[] oldState, Object[] newState)
    {
        super(source, entity, id, persister);
        this.oldState = oldState;
        this.newState = newState;
    }

    public Object[] getNewState()
    {
        return newState;
    }

    public Object[] getOldState()
    {
        return oldState;
    }

}
